home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / DEBUG / BPTRAP10 / TRAPDEMO.PAS < prev   
Pascal/Delphi Source File  |  1996-02-29  |  2KB  |  46 lines

  1. PROGRAM TrapDemo;
  2. { Demo program for BPTrap unit, Version 1.0
  3.   Copyright (C) 1996 by Frank Heckenbach, heckenb@mi.uni-erlangen.de
  4.  
  5.   This program is free software; you can redistribute it and/or modify
  6.   it under the terms of the GNU General Public License as published by
  7.   the Free Software Foundation, version 1, for NON-COMMERCIAL use.
  8.  
  9.   This program is distributed in the hope that it will be useful,
  10.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.   GNU General Public License for more details.
  13.  
  14.   You should have received a copy of the GNU General Public License
  15.   along with this program; if not, write to the Free Software
  16.   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. }
  17.  
  18. {$C FIXED PRELOAD PERMANENT} {Not necessary for real mode.}
  19.  
  20. USES BPTrap{$IFDEF WINDOWS},Wincrt{$ENDIF};
  21.  
  22. VAR a,b:Byte;
  23.  
  24. BEGIN
  25.   Writeln;
  26.   Writeln('TrapDemo version 1.0, Copyright (C) 1996 by Frank Heckenbach');
  27.   Writeln('TrapBP and TrapDemo come with ABSOLUTELY NO WARRANTY.');
  28.   Writeln('This is free software, and you are welcome to redistribute it');
  29.   Writeln('under certain conditions for NON-COMMERCIAL use.');
  30.   Writeln('For details see the file COPYING.');
  31.   Writeln;
  32.   Writeln('Before the trap...');
  33.   Writeln;
  34.   Randomize;
  35.   IF NOT Trap THEN
  36.     REPEAT
  37.       a:=Random(10);
  38.       b:=Random(10);
  39.       Writeln(a,'/',b,'=',a/b)
  40.     UNTIL False;
  41.   Writeln('Infinity.');
  42.   Write('Press Enter.');
  43.   Readln;
  44.   Write('The program caused a... ')
  45. END.
  46.